package com.night.administration.service.impl;

import com.night.administration.mapper.CourseMapper;
import com.night.administration.service.CourseService;
import com.night.common.entity.administration.Course;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: CourseServiceImpl
 * @Description: //TODO
 * @author: LZJ
 * @date: 2022/10/19-16:35
 * @version: v1.0
 */
@Service("CourseService")
@Transactional
public class CourseServiceImpl implements CourseService {
    @Resource
    private CourseMapper courseMapper;

    @Override
    public void insert(Course course) {
        courseMapper.insert(course);
    }

    @Override
    public List<Course> getByCondition(Course course) {
        return courseMapper.getByCondition(course);
    }

    @Override
    public void update(Course course) {
        courseMapper.update(course);
    }

    @Override
    public Course getCourse(int coursesId) {
        return courseMapper.getCourse(coursesId);
    }
}
